<template>
    <div style="padding: 20px;">
        topic:
        <el-select v-model="topic">
            <el-option label="开启任务" value="bpm-command-start-bpm"></el-option>
        </el-select>
        <br>
        content: <el-input type="textarea" v-model="value"/>
        <el-button type="primary" @click="send">发送</el-button>
    </div>
</template>
<script>
    export default {
        data(){
            return {
                value: "",
                topic:""
            }
        } ,
        methods:{
            send(){
                $.ajax({
                    url:"/workflow/sendmq",
                    type:"POST",
                    contentType:"application/json",
                    data: JSON.stringify({
                        topic: this.topic,
                        content: this.value
                    })
                }).then(e => {
                    this.$notify.success("发送成功")
                });
            }
        }
    }
</script>